#pragma once
#include "IGameState.h"

#include "..\..\SGD Wrappers\SGD_Handle.h"

class WorldState : public IGameState
{
private:
	/**********************************************************/
	// SINGLETON!
	WorldState(void) = default;
	virtual ~WorldState(void) = default;

	WorldState(const WorldState&) = delete;
	WorldState& operator= (const WorldState&) = delete;

	// Cursor for Pause Menu
	int nCursor;

	float fVictory;
	bool bVictory;
	
	// For fading out screen
	float fFadeout;

	// Load Level
	bool LoadLevel();
	bool bWait = true;

	// Tile Location
	const char* cTileMapLocation;

	// Pause
	bool bGamePaused;
	bool bInPauseMenu = false;
	// Assets
	SGD::HTexture hPauseBackground = SGD::INVALID_HANDLE;
	SGD::HTexture hBackground = SGD::INVALID_HANDLE;



public:
	/**********************************************************/
	// Singleton Accessor
	static WorldState* GetInstance(void);

	virtual void Enter();
	virtual void Exit();
	virtual bool Update(float dt);
	virtual void Render();

	float GetFadeout();
	void SetFadeout(float time);

	void LoadSaveInformation(const char* cSaveLoc, const char cSaveLevel, const bool bSaveHalfWay, const bool bSaveVilliger1,
		const bool bSaveVilliger2, const bool bSaveVilliger3);
	bool GamePause();

	void LoadObjects(const char* fileName);

	// Add powerUps to player
	void SetPlayerPowerUps(const int dam, const int hp, const float speed);

	void SetVictory(bool win);


};

